<template>
  <div class="site-management">
    <div class="header">
      <el-form :model="searchForm" :inline="true">
        <el-form-item label="选择电站">
          <el-select v-model="searchForm.site" placeholder="请选择电站" class="search-input">
            <el-option label="电站1" value="site1"></el-option>
            <el-option label="电站2" value="site2"></el-option>
            <el-option label="电站3" value="site3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="margin-left: auto;">
          <el-button @click="handleSearchOrg">新增</el-button>
          <el-button @click="resetSearchForm" type="primary">编辑</el-button>
        </el-form-item>
      </el-form>
    </div>
    <img src="./pic1.png" alt="电站图片" style="margin: 0.12rem 0;display: block;" />
    <img src="./pic2.png" alt="电站图片" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';

// 搜索表单
const searchForm = ref({
  site: ''
});

// 分页配置
const orgPagination = ref({
    total: 100,
    pageSize: 10,
    currentPage: 1
});

// 搜索组织
const handleSearchOrg = () => {
    console.log('搜索组织:', searchForm.value.site);
};

// 重置搜索表单
const resetSearchForm = () => {
    searchForm.value.site = '';
};
</script>

<style lang="scss" scoped>
.site-management {
  :deep(.el-form-item) {
    margin-bottom: 0;

    .el-form-item__label {
      line-height: 0.4rem;
    }
  }

  .header {
    padding: 0.12rem 0.16rem;
    .el-form{
    display: flex;
    align-items: center;
    }

    .search-input {
      width: 2rem;
    }
  }

}
</style>
